package me.seawenc.db.checker.dbengine;

import com.alibaba.fastjson.JSONObject;
import me.seawenc.db.checker.dbengine.impl.engines.bean.TableDetailBean;
import me.seawenc.db.checker.dbengine.impl.engines.bean.TableNameBean;

import java.util.List;

/**
 * 数据库引擎
 */
public interface IEngineService {

    /**
     * 获得数据库信息，用于测试数据连通性等
     * @return
     */
    String findVersion() throws Exception;


    /**
     * 获得所有的数据库表
     * @return
     * @throws Exception
     */
    List<TableNameBean> findAllTables() throws Exception;

    /**
     * 获得表明细
     */
    TableDetailBean findTableDetail(String tableName) throws Exception;


    List<JSONObject> execSelectSql(String sql) throws Exception;

    void closeDbCollection()throws Exception;

}
